﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DBSourceToolsLib;

namespace DBSourceTools
{
    public partial class DefaultSettings : Form
    {
        public DefaultSettings()
        {
            InitializeComponent();
            // TODO : COMPLETE 1.2.0.8 use isql instead of sqlcmd for SQL 2000 databases (billhuber)
            this.m_chkbExtendedProperties.Checked = UserSettings.Instance().UseExtendedProperties;
            this.m_chkbUseAnsi.Checked = UserSettings.Instance().UseANSII;
            this.m_checkBoxUseISql.Checked = UserSettings.Instance().UseIsql;
            this.m_checkBoxDisableIntellisense.Checked = UserSettings.Instance().DisableIntellisense;
        }

        private void m_btnOK_Click(object sender, EventArgs e)
        {
            UserSettings.Instance().UseExtendedProperties = this.m_chkbExtendedProperties.Checked;
            UserSettings.Instance().UseANSII = this.m_chkbUseAnsi.Checked;
            UserSettings.Instance().UseIsql = this.m_checkBoxUseISql.Checked;
            UserSettings.Instance().DisableIntellisense = this.m_checkBoxDisableIntellisense.Checked;
            UserSettings.Instance().SaveConfig();
        }
    }
}
